/*
 * @Description: topic管理
 * @Author: Wang ZhongWang
 * @Date: 2022-02-20 10:11:35
 * @LastEditTime: 2022-02-20 10:49:55
 * @LastEditors: Wang ZhongWang
 */

import request from '@/utils/request'

export function getAllTopic(query) {
  return request({
    url: '/winglinks/link/topic/getAll',
    method: 'get',
    params: query
  })
}

export function getListByDeviceIdentification(deviceIdentification) {
  return request({
    url: '/winglinks/link/topic/getListByDeviceIdentification/' + deviceIdentification,
    method: 'get'
  })
}

export function getListPage(query) {
  return request({
    url: '/winglinks/link/topic/list',
    method: 'get',
    params: query
  })
}

export function getTopicById(id) {
  return request({
    url: '/winglinks/link/topic/' + id,
    method: 'get'
  })
}

export function addTopic(query) {
  return request({
    url: '/winglinks/link/topic/add',
    method: 'post',
    data: query
  })
}

export function updateTopic(query) {
  return request({
    url: '/winglinks/link/topic',
    method: 'put',
    data: query
  })
}

export function deleteTopic(id) {
  return request({
    url: '/winglinks/link/topic' + id,
    method: 'delete'
  })
}

